package com.engine.salary.entity.taxagent.param;

import com.engine.salary.enums.salarysob.TargetTypeEnum;
import com.engine.salary.util.valid.DataCheck;
import com.engine.salary.util.valid.Modify;
import com.engine.salary.util.valid.ModifyTypeEnum;
import lombok.Data;

import java.util.Collection;
import java.util.List;

/**
 * 管理范围保存参数
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
@Data
public class TaxAgentManageRangeSaveParam {

    private Long id;

    /**
     * 只能选择 关联人员范围/从范围中排除
     */
    @DataCheck(require = true, max = 1, min = 0, message = "只能选择。0：排除、1：包含")
    private Integer includeType;

    /**
     * 对象不能为空
     */
    @DataCheck(require = true, message = "对象不能为空")
    private List<TaxAgentSubAdminRangeTargetParam> targetParams;

    /**
     * 员工状态不允许为空
     */
    @DataCheck(require = true,message = "员工状态不允许为空")
    private Collection<String> employeeStatus;

    /**
     * 个税扣缴义务人分管理员管理范围保存参数中的对象
     */
    @Data
    public static class TaxAgentSubAdminRangeTargetParam {

        /**
         * 对象类型不能为空
         */
        @DataCheck(require = true,message = "对象类型不能为空")
        private TargetTypeEnum targetType;

        /**
         * 对象不能为空
         */
        private Long targetId;

        /**
         * sql
         */
        @Modify(modifyType = ModifyTypeEnum.RESTORE_SQL)
        private String target;

        /**
         * 导入使用，员工状态
         */
        private Collection<String> employeeStatus;
    }
}
